package com.we823.cms.model.sys;

import java.util.List;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;

import com.alibaba.fastjson.annotation.JSONField;
import com.we823.cms.model.BaseModelWithDate;

@Entity
@Table(name="sys_user")
public class User extends BaseModelWithDate<Integer> {

	private static final long serialVersionUID = -5882862112356070424L;

	private String username;
	private String email;
	@Column(name="mobile_phone_number")
	private String mobilePhone;
	
	@JSONField(serialize=false)
	private String password;
	private String salt;
	private Integer blocked=0;
	private Integer deleted=0;
	private Integer admin=0;
	
	@Column(name="role_ids")
	private String roleIds;
	
	@Transient
	private List<Role> roles;
	
	public String getUsername() {
		return username;
	}
	public void setUsername(String username) {
		this.username = username;
	}
	public String getEmail() {
		return email;
	}
	public void setEmail(String email) {
		this.email = email;
	}
	public String getMobilePhone() {
		return mobilePhone;
	}
	public void setMobilePhone(String mobilePhone) {
		this.mobilePhone = mobilePhone;
	}
	public String getPassword() {
		return password;
	}
	public void setPassword(String password) {
		this.password = password;
	}
	public String getSalt() {
		return salt;
	}
	public void setSalt(String salt) {
		this.salt = salt;
	}
	
	public Integer getDeleted() {
		return deleted;
	}
	public void setDeleted(Integer deleted) {
		this.deleted = deleted;
	}
	public Integer getAdmin() {
		return admin;
	}
	public void setAdmin(Integer admin) {
		this.admin = admin;
	}
	public String getRoleIds() {
		return roleIds;
	}
	public void setRoleIds(String roleIds) {
		this.roleIds = roleIds;
	}
	public List<Role> getRoles() {
		return roles;
	}
	public void setRoles(List<Role> roles) {
		this.roles = roles;
	}
	public Integer getBlocked() {
		return blocked;
	}
	public void setBlocked(Integer blocked) {
		this.blocked = blocked;
	}
	
}
